package com.gregbugaj.gps.cmd;

import java.util.HashMap;

import com.gregbugaj.gps.CommandType;

public abstract class Command {
	protected String commandstring;
	protected CommandType type;
	
	public Command(CommandType type, String commandString){
		this.type=type;
		this.commandstring=commandString;
	}
	
	public abstract HashMap<String, Object> parse();
	
	@Override
	public String toString() {
		return "{CMD:"+type.name()+"="+commandstring+"} ";
	}

	public CommandType getType() {
		return type;
	}
}
